package com.ftg.learn.chapter05;

import java.util.LinkedList;
import java.util.Queue;

/**
 * 队列
 *
 * @author 布衣
 */
public class LearnQueue {

    public static void main(String[] args) {
        Queue<String> queue = new LinkedList<>();
        queue.add("aa");
        queue.add("bb");
        queue.offer("cxc");
        queue.add("dd");

        System.out.println(queue.poll());
        System.out.println(queue.remove());

        System.out.println(queue.element());
        System.out.println(queue.peek());
    }

}
